package Player;

import java.util.Vector;
import GameBoard.GameBoard;
import GameElements.Pawn;

public abstract class Player 
{
	protected String name = "";
	protected int score = 0;
	protected Vector<Pawn> pawn = new Vector<Pawn>();
	protected boolean playing = false;

	public abstract void play(GameBoard board);
	
	
	
	//getters
	public String getName() 
	{
		return name;
	}
	public int getScore() 
	{
		return score;
	}
	public Vector<Pawn> getPawn() 
	{
		return pawn;
	}
	
	//setters
	public void setName(String name) 
	{
		this.name = name;
	}
	public void setScore(int score) 
	{
		this.score = score;
	}
	public void setPawn(Vector<Pawn> pawn) 
	{
		this.pawn = pawn;
	}
	
	//playing
	public boolean isPlaying() 
	{
		return playing;
	}
	public void setPlaying(boolean playing) 
	{
		this.playing = playing;
	}
	
	public Pawn takePawn(int index)
	{
		Pawn p = null;
		if(index < pawn.size())
		{
			p = pawn.get(index);
			pawn.remove(index);
		}
		return p;
	}
	
}
